home *** CD-ROM | disk | FTP | other *** search
Wrap
-- Message Send to All Sprites -- Messaging -- behavior library version 1.1 -- EventtoSend must be a symbol -- whichEvent inits the action -- also functions through lingo by handling message 'initSendAllSprites', -- for example if this behavior was assigned to sprite 5, use -- sendsprite 5, #initSendAllSprites property whichEvent, eventToSend, params on initSendAllSprites me init me end on mouseUp me if whichEvent = #mouseup then init me end on mouseDown me if whichEvent = #mousedown then init me end on prepareFrame me if whichEvent = #prepareframe then init me end on enterFrame me if whichEvent = #enterframe then init me end on exitFrame me if whichEvent = #exitframe then init me end on init me set doit = "sendAllSprites the EventToSend of me," && params do doit end --- on getPropertyDescriptionList set p_list = [ #EventToSend: [ #comment: "Message:", #format: #symbol, #default: #generic_event ], #Params: [ #comment: "Param1, param2, ...", #format: #string, #default: "" ], #WhichEvent: [ #comment: "Initializing Event:", #format: #symbol, #range: [ #MouseUp, #MouseDown, #PrepareFrame, #EnterFrame, #ExitFrame, #InitSendAllSprites], #default: #MouseUp ] ] return p_list end on getBehaviorDescription return "Sends a message to every sprite in the current frame when the specified event occurs. Any behaviors that are triggered by the message will be executed." & RETURN & "PARAMETERS:" & RETURN & "ï Message - Enter the message to send." & RETURN & "ï Params - Enter the parameters to be sent with the message, seperated by commas." & RETURN & "ï Initializing Event - Specify the event that triggers the behavior." end